package com.yeyks.vip.dal.domain;

import com.baomidou.mybatisplus.annotation.IdType;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 酒店小vip售卡佣金提现订单表
 * </p>
 *
 * @author yun
 * @since 2020-01-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "MiniCardWithdrawalOrder对象", description = "酒店房费提现订单表")
public class MiniCardWithdrawalOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "提现订单号")
    @TableField("order_no")
    private String orderNo;

    @ApiModelProperty(value = "账户id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "账户名称")
    @TableField("account_name")
    private String accountName;

    @ApiModelProperty(value = "账户手机号")
    @TableField("account_phone")
    private String accountPhone;

    @ApiModelProperty(value = "账户类型(对应accountInfo表中的type)")
    @TableField("account_type")
    private Integer accountType;

    @ApiModelProperty(value = "开户人")
    @TableField("bank_user_name")
    private String bankUserName;

    @ApiModelProperty(value = "开户银行")
    @TableField("bank_name")
    private String bankName;

    @ApiModelProperty(value = "开户支行")
    @TableField("bank_branch_name")
    private String bankBranchName;

    @ApiModelProperty(value = "银行卡号")
    @TableField("bank_card")
    private String bankCard;

    @ApiModelProperty(value = "提现金额")
    @TableField("amount")
    private Integer amount;

    @ApiModelProperty(value = "订单类型：0：小v卖卡提成")
    @TableField("order_type")
    private Integer orderType;

    @ApiModelProperty(value = "状态，1审核中，2已打款，3拒绝")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "删除标记：0；未删除  1：已删除")
    @TableField("delete_flag")
    private Integer deleteFlag;

    @ApiModelProperty(value = "操作人ID")
    @TableField("operator_id")
    private Integer operatorId;

    @ApiModelProperty(value = "下单时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private Date updateTime;


    public static final String ID = "id";

    public static final String ORDER_NO = "order_no";

    public static final String ACCOUNT_ID = "account_id";

    public static final String ACCOUNT_NAME = "account_name";

    public static final String ACCOUNT_PHONE = "account_phone";

    public static final String ACCOUNT_TYPE = "account_type";

    public static final String BANK_USER_NAME = "bank_user_name";

    public static final String BANK_NAME = "bank_name";

    public static final String BANK_BRANCH_NAME = "bank_branch_name";

    public static final String BANK_CARD = "bank_card";

    public static final String AMOUNT = "amount";

    public static final String ORDER_TYPE = "order_type";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String DELETE_FLAG = "delete_flag";

    public static final String OPERATOR_ID = "operator_id";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public enum Status {
        wait(1, "审核中"),
        success(2, "已打款"),
        reject(3, "拒绝");
        int value;
        String desc;

        Status(int value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public Integer value() {
            return this.value;
        }

        public String desc() {
            return this.desc;
        }

        public static String getDesc(int value) {
            for (Status status : values()) {
                if (status.value() == value) {
                    return status.desc();
                }
            }
            return null;
        }
    }

}
